import { Editor } from '@valuation/core'

import {
  DW,
  GCXM,
} from './index'

export async function getEditor() {
  const editor = new Editor({
    content: schema => {
      return schema.topNodeType.createAndFill()
    },
    extensions: [
      GCXM,
      DW,
    ],
    onBeforeCreate() {
      console.log('beforeCreate')
    },
    enableContentCheck: true,
  })

  return editor.initialize()
}
